package com.ruyuan.eshop.common.enums.construction;

import com.ruyuan.eshop.common.exception.BaseErrorCodeEnum;

/**
 * 商品相关的异常枚举码
 * @author : zhonghuashishan
 *
 */
public enum ProductExceptionCode implements BaseErrorCodeEnum {

    /**
     * SQL执行异常
     */
    PRODUCT_SQL("2000", "SQL执行异常");

    private final String errorCode;
    private final String errorDesc;

    ProductExceptionCode(String errorCode, String errorDesc) {
        this.errorCode = errorCode;
        this.errorDesc = errorDesc;
    }

    @Override
    public String toString() {
        return errorCode + "-" + errorDesc;
    }

    @Override
    public String getErrorCode() {
        return errorCode;
    }

    @Override
    public String getErrorMsg() {
        return errorDesc;
    }
}
